package cn.com.leon.model;

import java.io.Serializable;

public class StudentScore implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7493729007761150238L;
	private ScoreList scoreList;
	private Student student;
	private Course course;
	private Double score;
	
	public StudentScore() {
		
	}
	
	public StudentScore(ScoreList scoreList,Student student, double score) {
		this.scoreList = scoreList;
		this.student = student;
		this.course = this.scoreList.getCourse();
		this.score = score;
	}

	public ScoreList getScoreList() {
		return scoreList;
	}

	public void setScoreList(ScoreList scoreList) {
		this.scoreList = scoreList;
	}
	
	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	@Override
	public boolean equals(Object obj) {
		return (this.scoreList.getGradeClass().getClassNum()+this.scoreList.getCourse().getCourseNum()+this.getStudent().getStudentNum()).equals(((StudentScore)obj).getScoreList().getGradeClass().getClassNum()+((StudentScore)obj).getCourse().getCourseNum()+((StudentScore)obj).getStudent().getStudentNum());
	}
	
}
